package day017.stream;

import java.util.ArrayList;

public class StreamDemo5 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i <= 10; i++) {
            list.add(i);
        }

        list.stream().filter(num -> num % 2 == 0).forEach(num ->
                System.out.println(num));
        System.out.println("=============================");
        System.out.println(list);
    }
}
